package tsing.javase.gofastdfs;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

@Data
public class GoFastResult {

    /**
     * 文件全路径
     */

    private String url;
    /**
     * md5
     */

    private String md5;
    /**
     * 文件相对路径
     */

    private String path;
    /**
     * 域名
     */

    private String domain;
    /**
     * 场景
     */

    private String scene;
    /**
     * 场景
     */

    private String scenes;
    /**
     * 响应消息
     */

    private String retmsg;
    /**
     * 响应编码
     */

    private int retcode;
    /**
     * 文件路径
     */

    private String src;

    /**
     * 文件名
     * @param parseObj
     */

    private String name;


    public GoFastResult(JSONObject parseObj) {
        this.url = parseObj.getString("url");
        this.md5 = parseObj.getString("md5");
        this.path = parseObj.getString("path");
        this.domain = parseObj.getString("domain");
        this.scene = parseObj.getString("scene");
        this.scenes = parseObj.getString("scenes");
        this.retmsg = parseObj.getString("retmsg");
        this.retcode = parseObj.getIntValue("retcode");
        this.src = parseObj.getString("src");
    }
}
